package com.maserb.monitor.repository.schoolStudent;

import com.maserb.monitor.entity.schoolStudent.SchoolTimeTableEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SchoolTimeTableRepository extends JpaSpecificationExecutor<SchoolTimeTableEntity>
        , PagingAndSortingRepository<SchoolTimeTableEntity, String> {

    @Query(value = "from SchoolTimeTableEntity where clazz.id=?1")
    List<SchoolTimeTableEntity> findAllByClazzId(String clazzId);
}